package com.smec.remes.api;

import com.smec.remes.bean.AbleMatnr;
import com.smec.remes.bean.DraftsDelete;
import com.smec.remes.bean.GetUserName;
import com.smec.remes.bean.MantrCheck;
import com.smec.remes.bean.MantrStatus;
import com.smec.remes.bean.NewPackingList;
import com.smec.remes.bean.NumberPrompt;
import com.smec.remes.bean.RequestSearch;
import com.smec.remes.bean.SearchContract;
import com.smec.remes.bean.SmecLogBean;
import com.smec.remes.bean.SubmitApply;
import com.smec.remes.bean.SubmitDetails;
import com.smec.remes.bean.SubmitFinish;
import com.smec.remes.bean.SubmitRegister;
import com.smec.remes.bean.SubmitSure;
import com.smec.remes.bean.query.PackingList;
import com.smec.remes.bean.query.Stock;
import com.smec.remes.module.request.SmecMatnrMsg;
import com.smec.remes.module.scan.beans.SmecAllocOrder;
import com.smec.remes.module.scan.beans.SmecOutboundOrder;
import com.smec.remes.smecManager.SmecRetrofit.HttpResult;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.WeakHashMap;

import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import rx.Observable;

import static com.smec.remes.api.SmecRemesApi.SmecConstant.GET_ALLOC_ORDER;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.GET_OUT_ORDER;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.GET_PRICE_ALL;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.LOG;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.MAKE_SURE_GET;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.MONTH;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.PACKING;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.PACKINGSURE;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.REQUEST_NUMBER;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.SMEC_ABLE_MATNR;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.SMEC_CONTRACT_CHECK;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.SMEC_GET_USERNAME;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.SMEC_MANTR_CHECK;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.SMEC_REQUEST_SEARCH;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.SMEC_SEARCH_CONTRACT;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.SMEC_SUBMIT_APPLY;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.SMEC_SUBMIT_DETAILS;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.SMEC_SUBMIT_REGISTER;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.SMEC_SUBMIT_REQUEST;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.SMEC_SURE_GOODS;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.STOCK_QUERY_SERVICE;
import static com.smec.remes.api.SmecRemesApi.SmecConstant.TEN_MANTR;

/**
 * Created by Administrator on 2017/11/27.
 */

public interface SmecRemesService {
    /**
     * 维保站APP-获取客户名称
     */
    @POST(SMEC_GET_USERNAME)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<ArrayList<GetUserName>>> getUserName(@Body HashMap<String,Object> map);

    /**
     * 维保站APP-操作申请单接口
     */
    @POST(SMEC_SUBMIT_APPLY)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult> submitApply(@Body SubmitApply submitApply);

    /**
     * 维保站APP-获取可用物料
     */
    @POST(SMEC_ABLE_MATNR)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<ArrayList<AbleMatnr>>> ableMatnr(@Body HashMap<String,Object> map);

    /**
     * 维保站APP-申请单查询接口
     */
    @POST(SMEC_REQUEST_SEARCH)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<ArrayList<RequestSearch>>> requestSearch(@Body HashMap<String,Object> map);

    /**
     * 维保站APP-查询合同号梯号
     */
    @POST(SMEC_SEARCH_CONTRACT)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<ArrayList<SearchContract>>> searchContract(@Body HashMap<String,Object> map);

    /**
     * 维保站APP-提交物料登记
     */
    @POST(SMEC_SUBMIT_REGISTER)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult> submitRegister(@Body SubmitRegister submitRegister);

    /**
     * 维保站APP-已申请单查询接口
     */
    @POST(SMEC_SUBMIT_REQUEST)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<ArrayList<SubmitFinish>>> submitRequest(@Body HashMap<String,Object> map);

    /**
     * 维保站APP-申请单查询接口
     */
    @POST(SMEC_SUBMIT_DETAILS)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<ArrayList<SubmitDetails>>> submitDetails(@Body HashMap<String,Object> map);

    /**
     * 维保站APP-草稿箱删除接口
     */
    @POST(SMEC_SUBMIT_APPLY)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult> _draftsDelete(@Body DraftsDelete draftsDelete);

    /**
     * 维保站APP-物料校验
     */
    @POST(SMEC_MANTR_CHECK)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<ArrayList<MantrStatus>>> _mantrCheck(@Body MantrCheck mantrCheck);

    /**
     * 维保站APP-校验产品合同号梯号
     */
    @POST(SMEC_CONTRACT_CHECK)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult> _contractCheck(@Body HashMap<String,String> map);

    /**
     * 维保站APP-确认收货接口
     */
    @POST(SMEC_SURE_GOODS)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult> _submitSure(@Body SubmitSure submitSure);

    /**
     *  查询工具-库存清单查询接口
     */
    @POST(STOCK_QUERY_SERVICE)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<ArrayList<Stock>>>_QueryList(@Body HashMap<String,Object> map);

    /**
     *  查询工具-成品装箱清单查询
     */
    @POST("/")
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<ArrayList<PackingList>>>_QueryPacking(@Body HashMap<String,Object> map);

    /**
     * 维保站APP-员工信息获取接口（已完结申请单数量、未绑定物料种数）
     */
    @POST(REQUEST_NUMBER)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<ArrayList<NumberPrompt>>>_requestNumber(@Body Object a);
    /**
     *  十种物料
     */
    @POST(TEN_MANTR)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<ArrayList<AbleMatnr>>>_tenMantr(@Body Object a);


    /**
     *  扫描-未收货界面
     */
    @POST(PACKING)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<NewPackingList>> _packing(@Body HashMap<String,Object> map);

    /**
     *  确认-未收货界面
     */
    @POST(PACKINGSURE)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult> _surePacking(@Body HashMap<String,Object> map);

    /**
     *  获取月数
     */
    @POST(MONTH)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<ArrayList<SearchContract>>> _month(@Body HashMap<String,Object> map);

    /**
     *  获取月数
     */
    @POST(LOG)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<ArrayList<SmecLogBean>>> getLog(@Body HashMap<String,Object> map);

    /**
     *  获取所有价格信息
     */
    @POST(GET_PRICE_ALL)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<SmecMatnrMsg>> getAllMaPrice(@Body HashMap<String,Object> map);

    /**
     *  获取出库单信息
     */
    @POST(GET_OUT_ORDER)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<SmecOutboundOrder>> getOutOrderMsg(@Body WeakHashMap<String,Object> map);

    /**
     *  获取调拨单信息
     */
    @POST(GET_ALLOC_ORDER)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult<SmecAllocOrder>> getAllocOrderMsg(@Body WeakHashMap<String,Object> map);

    /**
     *  出库单确认收货
     */
    @POST(MAKE_SURE_GET)
    @Headers({"Accept: application/vnd.githuSampleb.v3.full+json"})
    Observable<HttpResult> makeSureOrder(@Body SmecOutboundOrder smecOutboundOrder);
}
